{config_load file="layout_overlib.conf"}
<div>
<table id="main_table" cellspacing='0' >
<tr class="menu_header">
	<th>#</th>
	<th>
			<img src="./images/buttons/rank.png" alt="" width="17" height="17" />
	</th>
	<th>
			
	</th>
	<th>
			Role
	</th>
	{if $smarty.session.class_display eq 1}
	<th>
			Class
	</th>
	<th class="left">
			Name
	</th>
	{elseif $smarty.session.class_display eq 2}
	<th class="left">
			Name
	</th>
	{elseif $smarty.session.class_display eq 3}
	<th>
			Class
	</th>
	<th class="left">
			Name
	</th>
	{/if}
	<th>
		Comments
	</th>
	<th>
		<img src="./images/buttons/move_{if $container eq 'true'}up{else}down{/if}.png" alt="" width="16" height="16" onclick="{literal}if($('sort_container{/literal}{$raid_info.raid_id}{literal}').visible()) { this.src= './images/buttons/move_down.png'; new Effect.BlindUp('sort_container{/literal}{$raid_info.raid_id}{literal}', { duration: 0.5})} else { this.src= './images/buttons/move_up.png'; new Effect.BlindDown('sort_container{/literal}{$raid_info.raid_id}{literal}', { duration: 0.5}) };{/literal}" {popup text="Toggle the filter" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
	</th>
</tr>

{foreach name=mains item=character from=$mains}

<tr class="{if $character.user_id eq $user_id}row_3{else}{cycle values="row_1,row_2"}{/if}">
	<td>{$smarty.foreach.mains.iteration}</td>
	<td><img src=".{$character.team_image}" alt="" width="15" height="15" /></td>

	<td>
	{if $raid_info.leader_player_id eq $character.player_id}
		<img src="./images/buttons/leader_alliance.png" alt="" width="20" height="20" {popup text="This player is the leader for this raid." center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
	{/if}
	</td>
	<td>
	{if !empty($character.role_picture)}
	<img src="./images/roles/{$character.role_picture}" alt="" width="20" height="20" {popup text=$character.class_role_name  center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
	{else}
	<img src="./images/roles/unknown.png" alt="" width="20" height="20" {popup text="Character role unknown"  center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />	
	{/if}
	</td>
	</td>
	{if $smarty.session.class_display eq 1}
		<td>  <img src="./images/classes/{$character.class_picture}" alt="" width="20" height="20" /> </td>
		<td class="left""><a href="index.php?page=profile&pname={$character.name}" style="color: {$character.color_code}';" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{$character.name}</a></td>
		{elseif $smarty.session.class_display eq 2}
		<td class="left" style="color: {$character.color_code}';">  <img src="./images/classes/{$character.class_picture}" alt="" width="20" height="20" /> <a href="index.php?page=profile&pname={$character.name}" style="color: {$character.color_code}';" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{$character.name}</a></td>
		{elseif $smarty.session.class_display eq 3}
		<td>  <img src="./images/classes/{$character.class_picture}" alt="" width="20" height="20" /> </td>
		<td class="left" style="color: {$character.color_code}'"><a href="index.php?page=profile&pname={$character.name}" style="color: {$character.color_code}';" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{$character.name}</a></td>
	{/if}
	<td>
	{if $character.comment|count_characters gt 30}
	<a href="#" {popup text=$character.comment  center=#overlib_center# wrap=false offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor# width=145} >{$character.comment|truncate:24:"..."}</a>
	{else}
	{$character.comment}
	{/if}
	</td>
	<td>


	<img src="./images/buttons/clock.png" alt="" width="16" height="16" {popup text="Signup time:<br>`$character.signup_date`" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
	</td>
</tr>

{foreachelse}
<tr class="{cycle values="row_1,row_2"}">
	<td colspan=12>No characters could be found.</td>
</tr>

{/foreach}

<tr class="menu_header">
	<td colspan=12>Substitutes</td>
</tr>

{foreach name=subs item=character from=$subs}

<tr class="{cycle values="row_1,row_2"}">
	<td>{$smarty.foreach.subs.iteration}</td>
	<td><img src=".{$character.team_image}" alt="" width="15" height="15" /></td>
	<td>

	</td>
	<td>
	{if !empty($character.role_picture)}
	<img src="./images/roles/{$character.role_picture}" alt="" width="20" height="20" {popup text=$character.class_role_name  center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
	{else}
	<img src="./images/roles/unknown.png" alt="" width="20" height="20" {popup text="Character role unknown"  center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />	
	{/if}
	</td>
	{if $smarty.session.class_display eq 1}
	<td>  <img src="./images/classes/{$character.class_picture}" alt="" width="20" height="20" /> </td>
	<td class="left""><a href="index.php?page=profile&pname={$character.name}" style="color: {$character.color_code}';" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{$character.name}</a></td>
	{elseif $smarty.session.class_display eq 2}
	<td class="left" style="color: {$character.color_code}'">  <img src="./images/classes/{$character.class_picture}" alt="" width="20" height="20" /> <a href="index.php?page=profile&pname={$character.name}" style="color: {$character.color_code}';" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{$character.name}</a></td>
	{elseif $smarty.session.class_display eq 3}
	<td>  <img src="./images/classes/{$character.class_picture}" alt="" width="20" height="20" /> </td>
	<td class="left" style="color: {$character.color_code}'"><a href="index.php?page=profile&pname={$character.name}" style="color: {$character.color_code}';" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{$character.name}</a></td>
	{/if}
	<td>
	{if $character.comment|count_characters gt 30}
	<a href="#" {popup text=$character.comment  center=#overlib_center# wrap=false offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor# width=145} >{$character.comment|truncate:24:"..."}</a>
	{else}
	{$character.comment}
	{/if}
	</td>
	<td>
<img src="./images/buttons/clock.png" alt="" width="16" height="16" {popup text="Signup time:<br>`$character.signup_date`" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} />
</td>
</tr>

{foreachelse}
<tr class="{cycle values="row_1,row_2"}">
	<td colspan=12>No characters could be found.</td>
</tr>

{/foreach}

<tr class="menu_footer">
	<td colspan=12></td>
</tr>

</table>
</div>